package com.example.springbootjdbc.controller;

import com.example.springbootjdbc.entity.OrderInfo;
import com.example.springbootjdbc.mapper.OrderInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version V1.0
 * @author: hqk
 * @date: 2020/9/26 22:50
 * @Description:
 */
@RestController
public class TestController {

    @Autowired
    private OrderInfoMapper orderInfoMapper;

    @RequestMapping("test")
    public String gettest(){

        for (int i = 0; i < 10 ; i++) {
            OrderInfo orderInfo=new OrderInfo();
            orderInfo.setAmount("金额"+i);
            orderInfo.setStatus("状态"+i);
            orderInfoMapper.insert(orderInfo);
        }



        return "0";
    }
}
